package com.itaq.cheetah.serviceA.config.enums;

import java.util.Arrays;

/**
 * @author cheetah
 * @date 2022/7/20
 */
public enum EncryptType {

    /**
     *
     */
    RSA("RSA"),
    AES("AES");

    EncryptType(String code) {
        this.code = code;
    }

    private String code;

    private String code() {
        return code;
    }

    public static EncryptType get(String code) {
        return Arrays.stream(EncryptType.values())
                .filter(item -> item.code.equalsIgnoreCase(code))
                .findAny()
                .orElse(null);
    }

}
